refactor(cli): implement canonical path resolution in TUI and worker commands#16023
Closed
OpeOginni wants to merge 2 commits intoanomalyco:devfrom
Closed
refactor(cli): implement canonical path resolution in TUI and worker commands#16023OpeOginni wants to merge 2 commits intoanomalyco:devfrom
OpeOginni wants to merge 2 commits intoanomalyco:devfrom
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #15483: fix: symlink path resolution causing duplicate instances (#15482) Why it's related: This PR also addresses duplicate instance creation caused by path resolution issues. It specifically deals with symlink path resolution creating duplicate instances, which is conceptually similar to PR #16023's fix for path-casing creating duplicate instances on case-insensitive filesystems. Both are addressing the root cause of multiple logical instances being created for the same physical directory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
Fix inconsistent instance identity for case-variant paths
This fixes a regression where opencode ../dir could open TUI but streaming/UI state became inconsistent (for example, session updates/deletes not reflecting immediately).
Root cause: Instance cache keys used raw directory strings. On macOS case-insensitive filesystems, the same directory can appear with different casing (for example .../PERSONAL/... vs .../Personal/...) depending on caller/source (PWD, cwd, request headers). Those strings are not equal, so OpenCode created multiple logical instances for one physical directory.
What changed
How did you verify your code works?
Tested using
bun run dev ../another-dirwhen inside a folder with an all caps name e.g/TESTScreenshots / recordings
Checklist